package com.bci.pwtz.service.cad;

import java.util.ArrayList;

public class Oper_info
{
  boolean canrun_ask = false;
  public int cur = 0;
  public String info = "";
  boolean isfinish = false;
  boolean isshowed = false;
  boolean main_canrun = true;
  public int max = 0;

  public static boolean can_run(Oper_info pOper_info)
  {
    if (pOper_info == null)
      return true;
    if (!pOper_info.main_canrun)
    {
      pOper_info.canrun_ask = true;
      pOper_info.info = "操作被终止!";
    }
    return pOper_info.main_canrun;
  }

  public static boolean can_run(ArrayList<Oper_info> pArrayList, int pInt)
  {
    if ((pArrayList != null) && (pInt < pArrayList.size()))
      return can_run((Oper_info)pArrayList.get(pInt));
    return true;
  }

  public static void finish(Oper_info pOper_info, String pString)
  {
    if (pOper_info == null)
      return;
    msg(pOper_info, pString);
    pOper_info.cur = pOper_info.max;
  }

  public static void finish(ArrayList<Oper_info> pArrayList, int pInt, String pString)
  {
    if ((pArrayList != null) && (pInt < pArrayList.size()))
      finish((Oper_info)pArrayList.get(pInt), pString);
  }

  public static boolean isAllack(ArrayList<Oper_info> pArrayList)
  {
    boolean bool = false;
    if (pArrayList == null)
    	return bool;
    bool = true;
    for(int i=0; i<pArrayList.size(); i++)
    {
    	bool = isack((Oper_info)pArrayList.get(i));
    	if (!bool) {
    		break;
    	}
    }
    return bool;
    
//    int i;
//    if (pArrayList != null)
//    {
//      i = 0;
//      if ((i < pArrayList.size()) && (bool));
//    }
//    else
//    {
//      return bool;
//    }
//    if ((bool) && (isack((Oper_info)pArrayList.get(i))));
//    for (bool = true; ; bool = false)
//    {
//      i++;
//      break;
//    }
//    return bool;
  }

  public static boolean isack(Oper_info pOper_info)
  {
    if (pOper_info == null)
      return true;
    return pOper_info.canrun_ask;
  }

  public static void msg(Oper_info pOper_info, String pString)
  {
    if (pOper_info == null)
      return;
    pOper_info.isfinish = true;
    pOper_info.info = pString;
    pOper_info.isshowed = false;
  }

  public static void msg(ArrayList<Oper_info> pArrayList, int pInt, String pString)
  {
    if ((pArrayList != null) && (pInt < pArrayList.size()))
      msg((Oper_info)pArrayList.get(pInt), pString);
  }

  public static void next(Oper_info pOper_info)
  {
    next(pOper_info, null);
  }

  public static void next(Oper_info pOper_info, int pInt)
  {
    if (pOper_info == null);
    while (pOper_info.cur == pInt)
      return;
    pOper_info.cur = pInt;
    pOper_info.isshowed = false;
  }

  public static void next(Oper_info pOper_info, String pString)
  {
    if (pOper_info == null)
    	return;
    
    if (pOper_info.cur < pOper_info.max)
    {
      pOper_info.isshowed = false;
      pOper_info.isfinish = false;
      pOper_info.cur = (1 + pOper_info.cur);
    }

    if ((pString != null) && (!pOper_info.info.equals(pString)))
    {
      pOper_info.isshowed = false;
      pOper_info.info = pString;
    }
    else {
        if (!pOper_info.isfinish)
        {
          pOper_info.isfinish = true;
          pOper_info.isshowed = false;
        }
    }
    return;
    

    
//    while (true)
//    {
//      if (pOper_info.cur < pOper_info.max)
//      {
//        pOper_info.isshowed = false;
//        pOper_info.isfinish = false;
//        pOper_info.cur = (1 + pOper_info.cur);
//      }
//      while ((pString != null) && (!pOper_info.info.equals(pString)))
//      {
//        pOper_info.isshowed = false;
//        pOper_info.info = pString;
//        return;
//        if (!pOper_info.isfinish)
//        {
//          pOper_info.isfinish = true;
//          pOper_info.isshowed = false;
//        }
//      }
//    }
  }

  public static void next(ArrayList<Oper_info> pArrayList, int pInt)
  {
    if ((pArrayList != null) && (pInt < pArrayList.size()))
      next((Oper_info)pArrayList.get(pInt));
  }

  public static void next(ArrayList<Oper_info> pArrayList, int pInt1, int pInt2)
  {
    if ((pArrayList != null) && (pInt1 < pArrayList.size()))
      next((Oper_info)pArrayList.get(pInt1), pInt2);
  }

  public static void next(ArrayList<Oper_info> pArrayList, int pInt, String pString)
  {
    if ((pArrayList != null) && (pInt < pArrayList.size()))
      next((Oper_info)pArrayList.get(pInt), pString);
  }

  public static void per(Oper_info pOper_info)
  {
    per(pOper_info, null);
  }

  public static void per(Oper_info pOper_info, String pString)
  {
    if (pOper_info == null)
    	return;

    if ((pString != null) && !pOper_info.info.equals(pString)) {
        pOper_info.isshowed = false;
        pOper_info.info = pString;
    }
    else {
        if (pOper_info.cur > 1)
        {
          pOper_info.isshowed = false;
          pOper_info.cur = (-1 + pOper_info.cur);
        }
    }
    
//    do
//    {
//      if (pOper_info.cur > 1)
//      {
//        pOper_info.isshowed = false;
//        pOper_info.cur = (-1 + pOper_info.cur);
//      }
//    }
//    while ((pString == null) || (pOper_info.info.equals(pString)));
//    pOper_info.isshowed = false;
//    pOper_info.info = pString;
  }

  public static void set_can_run(Oper_info pOper_info, boolean pBoolean)
  {
    if (pOper_info == null)
      return;
    pOper_info.canrun_ask = false;
    pOper_info.main_canrun = pBoolean;
  }

  public static void set_can_run(ArrayList<Oper_info> pArrayList, boolean pBoolean)
  {
    if (pArrayList == null) 
    	return;

    for (int i = 0; i < pArrayList.size(); i++)
        set_can_run((Oper_info)pArrayList.get(i), pBoolean);
    
  }

  public static void startoi(Oper_info pOper_info, int pInt, String pString)
  {
    if (pOper_info == null)
    	return;

    pOper_info.max = (pInt + 1);
    pOper_info.cur = 1;
    pOper_info.isfinish = false;
    pOper_info.isshowed = false;

    if (pString != null)
    	pOper_info.info = pString;
  }

  public static void startoi(ArrayList<Oper_info> pArrayList, int pInt1, int pInt2, String pString)
  {
    if ((pArrayList != null) && (pInt1 < pArrayList.size()))
      startoi((Oper_info)pArrayList.get(pInt1), pInt2, pString);
  }
}

/* Location:           C:\Users\Survival\Desktop\APP\jd-gui\classes_dex2jar.jar
 * Qualified Name:     com.LVDIA.Oper_info
 * JD-Core Version:    0.6.2
 */